Copies the elements of the ReadOnlyDictionary to an System.Array, starting at a particular System.Array index.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)

Syntax

Visual Basic (Declaration)
Public 
Sub 
CopyTo ( _
	
array 
As 
KeyValuePair(
Of K, V)(), _
	
arrayIndex 
As 
Integer _
)
C#
public 
void 
CopyTo(
	
KeyValuePair<K, V>[] 
array,
	
int 
arrayIndex
)
Visual C++
public:
virtual 
void 
CopyTo(
	
array<
KeyValuePair<K, V>>^ 
array, 
	
int 
arrayIndex
) 
sealed
JavaScript
function 
copyTo(
array, 
arrayIndex);

Parameters

array
Type: array< KeyValuePair < (Of < ( K , V > ) > ) > [] () []
The one-dimensional System.Array that is the destination of the elements copied from ReadOnlyDictionary. The System.Array must have zero-based indexing.
arrayIndex
Type: Int32
The zero-based index in array at which copying begins.

Implements

ICollectionCopyTo( array< UTP > [] () [] , Int32)

Exceptions

Exception Condition
ArgumentOutOfRangeException Thrown when arrayIndex is less than 0.
ArgumentNullException Thrown when array is null.
ArgumentException Thrown when array is multidimensional, or when arrayIndex is greater than or equal to the length of array, or when the number of elements in the source ReadOnlyDictionalr is greater than the available space from arrayIndex to the end of the destination, or when Type T cannot be cast automatically to the type of the destination array.

See Also